package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.tborder.*;
import com.uzai.console.dto.feign.tlbelm.*;
import com.uzai.console.service.feign.impl.TbOrderFeignFallbackFactory;
import com.uzai.console.service.feign.impl.TlbElmOrderFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-order-server", fallbackFactory = TlbElmOrderFeignFallbackFactory.class)
public interface TlbElmOrderFeignService {

    /**
     * 饿了么订单拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/tlbelm/download")
    UzaiRespVo<Object> download(@RequestBody TlbElmOrderPullDto tlbElmOrderPullDto);

    /**
     * 根据订单号查询订单最新状态（同步）-推老板
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/tlbelm/get/order/by/orderid")
    UzaiRespVo<Object> getOrderByOrderid(@RequestBody TlbElmOrderPullDto tlbElmOrderPullDto);
    
    /**
     * 推老板饿了么订单确认收货
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param tlbElmOrderSettledDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/settled/elm/order")
    UzaiRespVo<Object> settled(@RequestBody TlbElmOrderSettledDto tlbElmOrderSettledDto);

    /**
     * 推老板饿了么订单绑定（异步）
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/elm/async")
    UzaiRespVo<Object> bindAsync(@RequestBody TlbElmOrderBindDto tlbElmOrderBindDto);

    /**
     * 推老板饿了么订单绑定（同步）
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/elm/sync")
    UzaiRespVo<Object> bindSync(@RequestBody TlbElmOrderBindDto tlbElmOrderBindDto);

    /**
     * 推老板饿了么订单解冻(同步)
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderUnfreezeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unfreeze/elm/sync")
    UzaiRespVo<Object> unfreezeSync(@RequestBody TlbElmOrderUnfreezeDto tlbElmOrderUnfreezeDto);

    /**
     * 推老板饿了么订单解绑用户(同步)
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param tlbElmOrderUnbindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unbind/elm/sync")
    UzaiRespVo<Object> unbindSync(@RequestBody TlbElmOrderUnbindDto tlbElmOrderUnbindDto);



    




}
